package com.xiaomazi.edu.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
* 课程
*/
@ApiModel(value="课程实体类")
@Data
@TableName(value = "edu_course")
public class Course implements Serializable {
    /**
     * 课程ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value="课程ID")
    private String id;

    /**
     * 课程讲师ID
     */
    @TableField(value = "teacher_id")
    @ApiModelProperty(value="课程讲师ID")
    private String teacherId;

    /**
     * 课程专业ID
     */
    @TableField(value = "subject_id")
    @ApiModelProperty(value="课程专业ID")
    private String subjectId;

    /**
     * 课程专业父级ID
     */
    @TableField(value = "subject_parent_id")
    @ApiModelProperty(value="课程专业父级ID")
    private String subjectParentId;

    /**
     * 课程标题
     */
    @TableField(value = "title")
    @ApiModelProperty(value="课程标题")
    private String title;

    /**
     * 课程销售价格，设置为0则可免费观看
     */
    @TableField(value = "price")
    @ApiModelProperty(value="课程销售价格，设置为0则可免费观看")
    private BigDecimal price;

    /**
     * 总课时
     */
    @TableField(value = "lesson_num")
    @ApiModelProperty(value="总课时")
    private Integer lessonNum;

    /**
     * 课程封面图片路径
     */
    @TableField(value = "cover")
    @ApiModelProperty(value="课程封面图片路径")
    private String cover;

    /**
     * 销售数量
     */
    @TableField(value = "buy_count")
    @ApiModelProperty(value="销售数量")
    private Long buyCount;

    /**
     * 浏览数量
     */
    @TableField(value = "view_count")
    @ApiModelProperty(value="浏览数量")
    private Long viewCount;

    /**
     * 乐观锁
     */
    @TableField(value = "version")
    @Version
    @ApiModelProperty(value="乐观锁")
    private Long version;

    /**
     * 课程状态 Draft未发布  Normal已发布
     */
    @TableField(value = "status")
    @ApiModelProperty(value="课程状态 Draft未发布  Normal已发布")
    private String status;

    /**
     * 逻辑删除 1（true）已删除， 0（false）未删除
     */
    @TableField(value = "is_deleted")
    @TableLogic
    @ApiModelProperty(value="逻辑删除 1（true）已删除， 0（false）未删除")
    private Byte isDeleted;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建时间")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value="更新时间")
    private Date gmtModified;

    private static final long serialVersionUID = 1L;
}